<?php

return [
    /**
     * 是否启用后台api
     */
    'enabled' => true,

    /**
     * 为后台api配置独立的域名
     */
    'domain' => env('ADMIN_DOMAIN'),

    /**
     * 后台api路径
     */
    'path' => env('ADMIN_PATH', 'admin-api'),

    /**
     * 后台api中间件
     */
    'middleware' => [
        'api',
        // \Destroyer\Http\Middleware\Authenticate::class,
        \Destroyer\Http\Middleware\FormatResponse::class,
        \Destroyer\Http\Middleware\RBAC::class,
    ],

    /**
     * oauth2|oidc登录
     */
    'oauth2' => [
        'github' => [
            'client_id' => 'Ov23li7T4vUgp3U7iWFD',
            'client_secret' => '',
            // 'redirect' => 'http://localhost:5173/oauth/callback/github',
            'redirect' => 'http://localhost:5173/oauth/callback?name=github',
        ],
        'dingtalk' => [
            // 3116888098
            'class' => \App\Admin\Socialite\DingtalkProvider::class,
            // 'client_id' => 'dingcc9fc87d8468bc61acaaa37764f94726',
            // 'client_id' => '9dff0980-dfe2-4526-b275-3406e133c382',App ID
            'client_id' => 'ding2zkjbuvhp3jns6vg',
            'client_secret' => '',
            // 'redirect' => url('/api/admin/oauth/dingtalk/exchange'),
        ],
        'authing' => [
            'class' => \App\Admin\Socialite\AuthingProvider::class,
            'client_id' => '652e11a1bc42a44a69ebdcd0',
            'client_secret' => '',
            // 'redirect' => url('/api/admin/oauth/authing/exchange'),
        ],
        'feishu' => [
            'class' => \App\Admin\Socialite\FeishuProvider::class,
            'client_id' => 'cli_a6c6d160afbb500d',
            'client_secret' => '',
            // 'redirect' => url('/api/admin/oauth/feishu/exchange'),
            // 'redirect' => 'https://www.llc.com/api/admin/oauth/exchangeToken',
        ],
        'work_weixin' => [
            // 1000002  OB4bOxAB_ykacOmaWfWQibLH3nzeRcqAG32bOXIJ8NI
            'class' => \App\Admin\Socialite\WorkWeixinProvider::class,
            'client_id' => '1000002',
            // 'client_id' => 'ww18c5ea4ad9f4e783',
            'client_secret' => '',
            // 'redirect' => url('/api/admin/oauth/work_weixin/exchange'),
        ],
    ],
];